package com.example.design.patterns.冰河.结构型模式.装饰模式;

import com.example.design.patterns.冰河.结构型模式.装饰模式.concreteComponent.Man;
import com.example.design.patterns.冰河.结构型模式.装饰模式.concreteDecorator.ManDecoratorA;
import com.example.design.patterns.冰河.结构型模式.装饰模式.concreteDecorator.ManDecoratorB;

public class Test {
    public static void main(String[] args) {
        Man man = new Man();
        ManDecoratorA manDecoratorA = new ManDecoratorA();
        ManDecoratorB manDecoratorB = new ManDecoratorB();
        manDecoratorA.setPerson(man);
        manDecoratorB.setPerson(manDecoratorA);
        manDecoratorB.eat();
    }
}
